package cn.topevery.garden.entity.dto;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * DTO
 *
 * @author code-generate
 * @date 2022-01-05
 */
@Data
@ApiModel(value = "ClockInDTO", description = " DTO")
public class ClockInDTO implements Serializable {
    /**
     * 自增id
     */
    private Integer id;
    private String entityId;
    @ApiModelProperty(value = "用户Id")
    private String userId;
    /**
     * 打卡人
     */
    @ApiModelProperty(value = "打卡人")
    private String name;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String desc;

    /**
     * 打卡地点
     */
    @ApiModelProperty(value = "打卡地点")
    private String address;

    /**
     * 打卡时间
     */
    @ApiModelProperty(value = "打卡时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime date;

    /**
     * x坐标
     */
    @ApiModelProperty(value = "x坐标")
    @NotNull(message = "经度不得为空")
    private Double lng;

    /**
     * y坐标
     */
    @ApiModelProperty(value = "y坐标")
    @NotNull(message = "纬度不得为空")
    private Double lat;

    /**
     * 部门
     */
    @ApiModelProperty(value = "企业")
    private String companyName;


    @ApiModelProperty(value = "企业Id")
    private String companyId;

    @ApiModelProperty(value = "是否范围内")
    private Boolean isRange;
    @ApiModelProperty(value = " 1 正常 2 迟到  3早退")
    private Integer isValid;
    @ApiModelProperty(value = "是否使用")
    private Integer isUse;
    @ApiModelProperty(value = "标段Id")
    private String sectionId;
    @ApiModelProperty(value = "标段名称")
    private String sectionName;
    @ApiModelProperty("1 上班卡 2 下班卡")
    public Integer type;
    @ApiModelProperty("迟到/早退时长 分钟")
    private Long overtimes;

}
